/*
countingIterator:  Fancy iterator, this iterator brings a sequence
                   of increasing values.
    Copyright (C) 2012  Jorge E. A. Atala
                        FuDePAN
    This file is part of the Fui Proyect.

    Fui is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    Fui is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Fui.  If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef COUNTING_ITERATOR_H
#   define COUNTING_ITERATOR_H
#   include "iteratorBase.h"
namespace fui
{
template<class T>
class CountingIterator : public IteratorBase<T>
{
private:
    T x;
public:
    CountingIterator(T x);

    inline T operator*() const;

    inline T operator[](const size_t index) const;

    inline CountingIterator<T> operator+(const size_t index) const;

    inline CountingIterator<T> operator-(const size_t index) const;

    inline CountingIterator<T> operator-(const CountingIterator<T> other) const;

    inline CountingIterator<T>& operator++();

    inline CountingIterator<T>& operator--();

    inline CountingIterator<T> operator++(const int);

    inline CountingIterator<T> operator--(const int);

    inline bool operator==(const CountingIterator<T>& other)const;

    inline bool operator!=(const CountingIterator<T>& other)const;

    inline bool operator<(const CountingIterator<T>& other)const;
};
}
#define COUNTING_ITERATOR_IMP
#   include "countingIterator_imp.h"
#undef COUNTING_ITERATOR_IMP

#endif
